package com.example.markdownmindmap.entity;

import lombok.Data;
import java.util.ArrayList;
import java.util.List;

/**
 * 思维导图节点实体类
 */
@Data
public class MindMapNode {
    // 节点名称
    private String name;
    private int  titleLevel;
    private int  depth;
    
    // 子节点列表
    private List<MindMapNode> children = new ArrayList<>();
    
    public MindMapNode(String name) {
        this.name = name;
    }
    
    // 添加子节点
    public void addChild(MindMapNode child) {
        this.children.add(child);
    }
}
